import requests


class IhrmLoginApi(object):
    @classmethod
    def ihrm_login(cls, data):
        resp = requests.post(url="http://ihrm-test.itheima.net/api/sys/login",
                             json=data)
        return resp


if __name__ == '__main__':
    data = {"mobile": "13800000002", "password": "123456"}
    resp = IhrmLoginApi.ihrm_login(data)
    print(resp.json())
    print(resp.json().get("data"))
